.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "LIFX_DASH" "1" "June 2016" "" ""
.
.SH "NAME"
\fBlifx_dash\fR \- Toggle LIFX lights with an Amazon Dash button
.
.SH "SYNOPSIS"
\fBlifx_dash\fR \fBmonitor\fR \-m DASH_MAC_ADDRESS \-t LIFX_API_TOKEN
.
.br
\fBlifx_dash\fR \fBsnoop\fR
.
.br
\fBlifx_dash\fR \fBconfig\fR
.
.SH "DESCRIPTION"
\fBlifx_dash\fR is a simple command\-line tool to monitor your network for Amazon Dash button presses and toggle LIFX lights ON and OFF\. The tool provides two commands, \fBmonitor\fR and \fBsnoop\fR\.
.
.P
Use \fBsnoop\fR to listen for Dash presses on your network, and identify the button\'s MAC address\.
.
.P
Use \fBmonitor\fR (with a MAC address and LIFX HTTP API token) to respond to presses, and toggle your lights ON and OFF\. You can optionally pass a bulb selector, or choose to daemonize the \fBmonitor\fR process\.
.
.P
A \fBconfig\fR command also exists, allowing you to set default options for \fBmonitor\fR and \fBsnoop\fR\.
.
.SH "REQUIREMENTS"
\fBlifx_dash\fR requires at least one LIFX bulb, and any Amazon Dash button\. You will also need a wifi network and root access to sniff packets on your network adaptor\.
.
.P
Follow Amazon\'s Dash button setup steps, but \fBstop\fR before choosing any particular product to purchase\. You aill also need a free LIFX API token from here: \fIhttps://cloud\.lifx\.com/settings\fR
.
.SH "OPTIONS"
The snoop command has one optional flag, the network interface to listen on\.
.
.IP "\(bu" 4
\fB\-i\fR, \fB\-\-iface=arg\fR: Network Interface (default: en0)
.
.IP "" 0
.
.P
Wait for the network to quiet down, before pressing the button, since other devices may respond with ARP packets of their own when you press\. Take care to choose the MAC address from the ARP packet that occurs only once from a single MAC address\.
.
.P
The \fBmonitor\fR command accepts the following flags, both a mac address and api token are required\.
.
.IP "\(bu" 4
\fB\-m\fR, \fB\-\-mac\-address=arg\fR: Dash button MAC Address (required)
.
.IP "\(bu" 4
\fB\-t\fR, \fB\-\-token=arg\fR: LIFX HTTP API Token (required)
.
.IP "\(bu" 4
\fB\-s\fR, \fB\-\-selector=arg\fR: LIFX Bulb Selector (default: all)
.
.IP "\(bu" 4
\fB\-i\fR, \fB\-\-iface=arg\fR: Network Interface (default: en0)
.
.IP "\(bu" 4
\fB\-d\fR, \fB\-\-[no\-]daemonize\fR: Dameonize the monitor process (default: no)
.
.IP "\(bu" 4
\fB\-l\fR, \fB\-\-log\-file\fR: Log file location (when running as a daemon) (default: /tmp/lifx_dash\.log)
.
.IP "" 0
.
.SH "EXAMPLES"
Get help on command options and arguments
.
.IP "" 4
.
.nf

$ lifx_dash \-h
$ lifx_dash monitor \-h
$ lifx_dash snoop \-\-help
.
.fi
.
.IP "" 0
.
.P
Snoop for Dash button presses on en1
.
.IP "" 4
.
.nf

$ lifx_dash snoop en1
.
.fi
.
.IP "" 0
.
.P
Monitor Dash button presses on en0 with DASH_MAC_ADDRESS and LIFX_API_TOKEN, when pressed, toggle all lights
.
.IP "" 4
.
.nf

$ lifx_dash monitor \-t LIFX_API_TOKEN \-m DASH_MAC_ADDRESS
.
.fi
.
.IP "" 0
.
.P
Monitor Dash button presses on en1 with a DASH_MAC_ADDRESS and LIFX_API_TOKEN, when pressed toggle the light with id \'d3b2f2d97459\'
.
.IP "" 4
.
.nf

$ lifx_dash monitor \-\-token=LIFX_API_TOKEN \-\-mac\-address=DASH_MAC_ADDRESS \-s \'d3b2f2d97459\' \-i en1
.
.fi
.
.IP "" 0
.
.P
Show the current configuration file options
.
.IP "" 4
.
.nf

$ lifx_dash config \-s
.
.fi
.
.IP "" 0
.
.SH "FILES"
Use the \fBconfig\fR command to set values for the command options\. These will be saved to: ~/\.lifx_dash\.rc\.yml and used as defaults\. They can still be overridden by any arguments passed on the command line\.
.
.P
If running as a daemon (\-d switch), the \fBlifx_dash monitor\fR command will log to \fB/tmp/lifx_dash\.log\fR by default\. Use the \-\-log\-file flag to override this\.
.
.SH "BUGS"
No known bugs\. Please report issues here: \fIhttps://github\.com/matthutchinson/lifx_dash/issues\fR
.
.SH "LICENSE"
The MIT License: \fIhttps://raw\.githubusercontent\.com/matthutchinson/lifx_dash/master/LICENSE\.txt\fR
.
.SH "COPYRIGHT"
Copyright (c) 2016 Matthew Hutchinson
.
.SH "AUTHOR"
Matthew Hutchinson, \fIhttps://matthewhutchinson\.net\fR
.
.SH "SEE ALSO"
.
.IP "\(bu" 4
\fIhttps://rubygems\.org/gems/lifx_dash\fR
.
.IP "\(bu" 4
\fIhttps://github\.com/matthutchinson/lifx_dash\fR
.
.IP "\(bu" 4
\fIhttps://cloud\.lifx\.com/settings\fR
.
.IP "\(bu" 4
\fIhttp://tinyurl\.com/zujfkjs\fR
.
.IP "" 0

